Generating Log Messages from Repository |
|
- Provide the input parameters and run the tool.
- For the com.eibus.tools.internal.MessageGenerator tool, specify the alert repository file name and the fully qualified name of the class to be generated (this includes the package to which the class belongs).
- Set the Classpath, Path and CORDYS_INSTALL_DIR in the following format:
Operating System
Path
Windows
* Set CORDYS_INSTALL_DIR = <Process_Platform_Installation_Directory>
* Set CLASSPATH = %CLASSPATH% ; <Process_Platform_Installation_Directory> / Cordys.jar
* Set PATH = % PATH% ; <Process_Platform_Installation_Directory> / LibLinux
* Export CORDYS_INSTALL_DIR = <Process_Platform_Installation_Directory>
* Export CLASSPATH = $CLASSPATH : <Process_Platform_Installation_Directory> / Cordys.jar
* Export PATH = $ PATH : <Process_Platform_Installation_Directory> / Lib - Run the Message Generator tool to generate the . java file. This file is generated in the directory, from where you run the tool. If you mention only the class name as an input parameter, the package will not be defined.
A sample code to generate the Java file is given below:Here, Cordys.ESBServer.LogMessages.xml is the LogMessage repository file name while com.eibus.localization.message.internal.LogMessages is the name of the class to be generated. The LogMessages.java file containing the source is generated.java com.eibus.tools.internal.MessageGenerator <Messagedefinitions.xml> <Fully qualified classname> Example: java com.eibus.tools.internal.MessageGenerator Cordys.ESBServer.LogMessages.xml com.eibus.localization.message.internal.LogMessages
- Run the LogMessages.java from the command prompt.
Here's an example:The logMessages class file is generated.javac -d . LogMessages.java
- Modify the classpath to include the class file.
- Copy the <message repository>. xml file to <Process_Platform_Installation_Directory>\<localization folder>.